import request from '@/common/request.js'	

/**
 * 案例列表
 */
export function caseList(data){
	return new Promise(function(resolve, reject) {
		request({
			url: "house/case",
			method: "get",
			data
		}).then(res => {
			return resolve(res)
		})
	})		
}
/**
 * 案例坐标列表
 */
export function caseCovers(data){
	return new Promise(function(resolve, reject) {
		request({
			url: "house/covers",
			method: "get",
			data
		}).then(res => {
			return resolve(res)
		})
	})		
}
/**
 * 案例详情
 */
export function caseDetail(id){
	return new Promise(function(resolve, reject) {
		request({
			url: `house/case/${id}`,
			method: "get"
		}).then(res => {
			return resolve(res)
		})
	})		
}
/**
 * 城市列表
 */
export function cityList(data){
	return new Promise(function(resolve, reject) {
		request({
			url: "house/city",
			method: "get",
			data
		}).then(res => {
			return resolve(res)
		})
	})		
}
/**
 * 获取报价
 */
export function housePrice(data){
	return new Promise(function(resolve, reject) {
		request({
			url: "house/getPrice",
			method: "post",
			data
		}).then(res => {
			return resolve(res)
		})
	})		
}
/**
 * 保存获取报价信息
 */
export function housePriceSave(data){
	return new Promise(function(resolve, reject) {
		request({
			url: "house/priceRecord",
			method: "post",
			data
		}).then(res => {
			return resolve(res)
		})
	})		
}
/**
 * 风格列表
 */
export function styleList(data){
	return new Promise(function(resolve, reject) {
		request({
			url: "house/style",
			method: "get",
			data
		}).then(res => {
			return resolve(res)
		})
	})		
}
/**
 * 户型列表
 */
export function typeList(data){
	return new Promise(function(resolve, reject) {
		request({
			url: "house/type",
			method: "get",
			data
		}).then(res => {
			return resolve(res)
		})
	})		
}
